package com.xiaxiang.xiawan.NetBean;
import com.google.gson.Gson;

/**
 * Created by mk on 2017/11/24.
 */

public class BaseNetBean {
    /**
     * code : 200
     * content : {}
     */

    private int CODE_SUCCESS = 200;
    private int code;
    private String content;

    public static BaseNetBean objectFromData(String str) {
        return new Gson().fromJson(str, BaseNetBean.class);
    }

    public void setCode(int code) {
        this.code = code;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getCode() {
        return code;
    }

    public String getContent() {
        return content;
    }


    public boolean isSuccess() {
        return getCode() == CODE_SUCCESS;
    }

}
